# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-jaraco.text
_pkgreal=${pkgname#"py3-"}
pkgver=3.8.0
pkgrel=0
pkgdesc="Module for text manipulation"
url="https://github.com/jaraco/jaraco.text"
arch="noarch"
license="MIT"
depends="py3-jaraco.context py3-jaraco.functools"
makedepends="
	py3-build
	py3-installer
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/j/jaraco.text/jaraco.text-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	GIT_DIR=. python3 -m build --no-isolation --wheel
}

check() {
	python3 -m installer -d testenv dist/$_pkgreal-$pkgver-py3-none-any.whl
	local sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
	PYTHONPATH="$PWD/testenv/$sitedir" python3 -m pytest --ignore testenv
}

package() {
	python3 -m installer -d "$pkgdir" dist/$_pkgreal-$pkgver-py3-none-any.whl
}

sha512sums="
3526f1371d8f2e7c79dff61941b1b4ead3d0f4b5144f0e22dbd098ec244b9ffddba4bbeaa0d817a80ff422fa5c7ae11d0959d3f56044d7c5f95d8c8a5de8ad2f  jaraco.text-3.8.0.tar.gz
"
